<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>{{ title }}</title>
</head>
<body>
    <h1>{{ title }}</h1>
    
    <form method="post">
        {% csrf_token %}
        <table>
            {{ form.as_table }}
        </table>
        <input type="submit" value="提交">
    </form>
    
    <p>
        {% if object %}
            <a href="{% url 'book-detail' object.pk %}">返回图书详情</a>
        {% else %}
            <a href="{% url 'books' %}">返回图书列表</a>
        {% endif %}
    </p>
</body>
</html> 